home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1991 / Jan 91 / MacApp.Tech$ 1⁄25⁄91 / 2744-?HELP? adding Items -Jan91 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.2 KB  |  43 lines  |  [TEXT/GEOL]

  1. Item    1287789                         19-Jan-91        06:51PST
  2.  
  3. From:   GER.XSE0096                     Germany - Ciechowski Computer,IDV
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Item forwarded by       SPA.DTS      to SPA0144 
  8.  
  9. ------------------------------------------------------------------------------
  10.  
  11. Sub:    ?HELP? adding Items to TPopup
  12.  
  13. I want to add and remove Items from a Popup-Menu in one of my TDialog-Views. I
  14. tried to override the TPopup::IRes - Method as follows
  15.  
  16. pascal voidTBankPopup::IRes(TDocument *Doc, TView *SView, Ptr *Param)
  17. //
  18. // Add some Items to the current menu
  19. {
  20.     TPopup::IRes(Doc, SView, Param);             //call original
  21.       shortmenuID, item;
  22.       CmdToMenuItem(kBKnone, &menuID, &item);  //  get Resource-Infos
  23.       MenuHandle   theMenu = GetMHandle(menuID);   //  get MenuHandle
  24.    AppendMenu(theMenu, "\pMy new Item");         // append new Item
  25. }
  26.  
  27.  
  28. … but this doesn´t do anything (I think this is because AppendMenu only works
  29. with menus from the menu-bar)
  30.  
  31.  
  32. Any ideas are welcome.
  33.  
  34. Ingo
  35.  
  36.  
  37.  
  38.  
  39. PS:     I still don´t know how to save & restore a Windows (TWindow) position
  40.         in case I don´t want go back to MacOS.
  41.         Is there any good mechanism provided by MacApp ??
  42.  
  43.